import os, sys, re

EXCL = "*.pyc *bak* *tmp* *.out .* mkPyDictAll.cmd PyDict_devcert.sis"

os.system('mkPyDict.cmd')
ver = re.search(r"SIS_VERSION\s*=\s*(.*?)\s", file("src\default.py").read()).group(1)
zip = "PyDict.%s.zip" % ver
if os.path.isfile(zip): os.remove(zip)
os.system('zip -9 -r %s * -x %s -c "Please read the file README!"' % (zip, EXCL))
